home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / LOGO / H282.ZIP / MSWLOGO.ZIP / EXAMPLES.ZIP / DEMO.WIN < prev    next >
Encoding:
Text File  |  1993-03-05  |  2.9 KB  |  106 lines

  1. to drawthing
  2. setpencolor scrollbarget "s1 scrollbarget "s2 scrollbarget "s3
  3. repeat scrollbarget "s4~
  4.   [~
  5.   run comboboxgettext "c1~
  6.   if equalp "HEXAGON listboxgetselect "l1 [repeat 6 [fd 100 rt 60]]~
  7.   if equalp "SQUARE listboxgetselect "l1 [repeat 4 [fd 100 rt 90]]~
  8.   if equalp "TRIANGLE listboxgetselect "l1 [repeat 3 [fd 100 rt 120]]~
  9.   run comboboxgettext "c2~
  10.   ]
  11. end
  12.  
  13. to myblue
  14. staticupdate "st13 sentence [Blue] scrollbarget "s3
  15. end
  16.  
  17. to myend
  18. dialogdelete "d1
  19. end
  20.  
  21. to mygreen
  22. staticupdate "st12 sentence [Grn] scrollbarget "s2
  23. end
  24.  
  25. to mynil
  26. end
  27.  
  28. to myred
  29. staticupdate "st11 sentence [Red] scrollbarget "s1 
  30. end
  31.  
  32. to myrepeat
  33. staticupdate "st14 sentence [Repeat Count] scrollbarget "s4 
  34. end
  35.  
  36. to mystatic
  37. staticupdate "st14 sentence [Repeat Count] scrollbarget "s4 
  38. end
  39.  
  40. to demo
  41. make "cmw 75
  42. make "cmh 30
  43. make "sth 12
  44. make "lsw :cmw
  45. make "lsh 20
  46. make "scw 10
  47. make "sch 40
  48. make "btw 50
  49. make "bth 12
  50. make "gapx 6
  51. make "gapy 6
  52. make "mary 2
  53. make "wnx 180
  54. make "wny 120
  55. make "wnx2 :wnx / 2
  56. make "wny2 :wny / 2
  57. make "wnx3 :wnx / 3
  58. make "wny3 :wny / 3
  59. make "wnx6 :wnx / 6
  60. make "wny6 :wny / 6
  61. make "st2w 30
  62. make "row2 :wny3+:gapy
  63. make "row3 :wny3*2-:gapy/2
  64.  
  65. dialogcreate "main "d1 [This is a Demo Windows Application] 0 0 :wnx+:gapy :wny+:gapy
  66.  
  67. staticcreate "d1 "st2 [Select Pre-Command] :gapx :mary :cmw :sth
  68. comboboxcreate "d1 "c1 :gapx :sth+:mary :cmw :cmh
  69. comboboxaddstring "c1 [PU FD 50 PD]
  70. comboboxaddstring "c1 [PU FD 100 PD]
  71. comboboxaddstring "c1 [PU FD REPCOUNT PD]
  72.  
  73. staticcreate "d1 "st3 [Select Post-Command] :wnx2+:gapx :mary :cmw :sth
  74. comboboxcreate "d1 "c2 :wnx2+:gapx :sth+:mary :cmw :cmh
  75. comboboxaddstring "c2 [PU BK 50 PD RT 2]
  76. comboboxaddstring "c2 [PU BK 100 PD RT 5]
  77. comboboxaddstring "c2 [PU BK REPCOUNT PD RT 5]
  78. comboboxsettext "c2 [RT 5]
  79.  
  80. staticcreate "d1 "st4 [Select Shape] :gapx :row2 :lsw :sth
  81. listboxcreate "d1 "l1 :gapx :row2+:sth+1 :lsw :lsh
  82. listboxaddstring "l1 "SQUARE
  83. listboxaddstring "l1 "TRIANGLE
  84. listboxaddstring "l1 "HEXAGON
  85.  
  86. staticcreate "d1 "st11 "Red :wnx6*3+:gapx :row2 :st2w :sth
  87. scrollbarcreate "d1 "s1 :wnx6*3+:gapx :row2+:sth :scw :sch [myred]
  88. scrollbarset "s1 1 255 125 myred
  89.  
  90. staticcreate "d1 "st12 "Grn :wnx6*4+:gapx :row2 :st2w :sth
  91. scrollbarcreate "d1 "s2 :wnx6*4+:gapx :row2+:sth :scw :sch [mygreen]
  92. scrollbarset "s2 1 255 125 mygreen
  93.  
  94. staticcreate "d1 "st13 "Blue :wnx6*5+:gapx :row2 :st2w :sth
  95. scrollbarcreate "d1 "s3 :wnx6*5+:gapx :row2+:sth :scw :sch [myblue]
  96. scrollbarset "s3 1 255 125 myblue
  97.  
  98. staticcreate "d1 "st14 [Repeat Count] :gapx :row3 :sch*2 :sth
  99. scrollbarcreate "d1 "s4 :gapx :row3+:sth :sch*2 :scw [myrepeat]
  100. scrollbarset "s4 1 360 72 myrepeat
  101.  
  102. buttoncreate "d1 "b1 "END :gapx :wny-:bth-:gapy :btw :bth [myend]
  103. buttoncreate "d1 "b3 "CLEAR :wnx2-:btw/2 :wny-:bth-:gapy :btw :bth [cs]
  104. buttoncreate "d1 "b2 "DRAW :wnx-:btw-:gapx :wny-:bth-:gapy :btw :bth [drawthing]
  105. end
  106.